package de.tudarmstadt.fgbs.cafe.login;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class DummyAuthenticator implements LoginInterface {

    private static Log LOG = LogFactory.getLog(DummyAuthenticator.class);

    /**
     * Every user will be accepted as authenticated.
     * 
     * @param username
     *            The name of the user.
     * @param password
     *            The password of the user.
     * @return <code>true</code>
     */
    @Override
    public boolean login(String username, String password) {
	if (LOG.isTraceEnabled())
	    LOG.trace("# DummyAuthenticator.login(" + username + ", ***)");
	if (LOG.isInfoEnabled())
	    LOG.info("# user[" + username + "] has been logged in successfully");
	return true;
    }

}
